//
//  ColorUtil.m
//  taishan
//
//  Created by mac on 2019/4/8.
//  Copyright © 2019年 jznrj. All rights reserved.
//

#import "ColorUtil.h"

@implementation ColorUtil
+(UIColor*) titleColor{
    return [UIColor colorWithRed:199/255.0 green:0/255.0 blue:10/255.0 alpha:1.0];
}
/*ffaa5a**/
+(UIColor*) lightTitleColor{
    return [UIColor colorWithRed:255/255.0 green:170/255.0 blue:90/255.0 alpha:1.0];
}
+(UIColor*) backgroundColor{
    return [UIColor colorWithRed:245/255.0 green:245/255.0 blue:245/255.0 alpha:1.0];
}
/*FCA143**/
+(UIColor*) searchJobIndexColor{
    
    return [UIColor colorWithRed:255/255.0 green:110/255.0 blue:64/255.0 alpha:1.0];
}
/*55A51C**/
+(UIColor*) registerIndexColor{
    
    return [UIColor colorWithRed:20/255.0 green:231/255.0 blue:21/255.0 alpha:1.0];
}
/*E8C51F**/
+(UIColor*) marketOnlineIndexColor{
    
    return [UIColor colorWithRed:255/255.0 green:215/255.0 blue:0/255.0 alpha:1.0];
}
/*479EE1**/
+(UIColor*) jiaIndexColor{
    
    return [UIColor colorWithRed:64/255.0 green:196/255.0 blue:255/255.0 alpha:1.0];
}
/*F3F3F3**/
+(UIColor*) lightDarkColor{
    return [UIColor colorWithRed:243/255.0 green:243/255.0 blue:243/255.0 alpha:1.0];
}
+(UIColor*) payMessageColor{
    return [UIColor colorWithRed:255/255.0 green:181/255.0 blue:84/255.0 alpha:1.0];
}

+(UIImage*) navigationBarColor:(UIColor*) color
                       BarSize:(CGRect)frame
                         alphe:(CGFloat) alphe{
    
//    frame = CGRectMake(0, 0, frame.size.width, frame.origin.y);
//    UIGraphicsBeginImageContext(frame.size);
//    CGContextRef context = UIGraphicsGetCurrentContext();
//    CGContextSetFillColorWithColor(context, [color CGColor]);
//    CGContextFillRect(context, frame);
//    UIImage *theImage = UIGraphicsGetImageFromCurrentImageContext();
//    UIGraphicsEndImageContext();
    UIGraphicsImageRendererFormat *format = [[UIGraphicsImageRendererFormat alloc] init];
        format.opaque = NO;
        format.scale = 0.0;
        UIGraphicsImageRenderer *render = [[UIGraphicsImageRenderer alloc] initWithSize:frame.size format:format];
        UIImage *image = [render imageWithActions:^(UIGraphicsImageRendererContext * _Nonnull rendererContext) {
            CGRect rect = CGRectMake(0, 0, frame.size.width, frame.size.height);
            [color setFill];
            UIRectFill(rect);
        }];
    
    return image;
}
@end
